package com.jwm.power.repository;

import com.jwm.power.model.entity.Formcustoms;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
public interface FormcustomsRepository   extends JpaRepository<Formcustoms, Integer>, JpaSpecificationExecutor<Formcustoms> {
    //  获取最大编码
    @Query(value = "select top 1 RIGHT(fcode,4) from Formcustoms where modulename=?1 order by fcode DESC ", nativeQuery = true)
    String getMaxCode(String modulename);
}